Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ClimateEntityFeature.TURN_OFF for Google Assistant calls #163

Closed
wants to merge 1 commit into from

Conversation

bryanyork
Copy link

Google Assistant expects to call the turn_off service which does not exist unless specifically enabled as a ClimateEntityFeature.TURN_OFF feature.

Previously calls to turn off my Kumo devices would fail silently from Google and an error message in Home Assistant regarding an unsupported service.

I have tested this change to fix my issue.

Google Assistant expects to call the turn_off service which does not exist unless specifically enabled as a ClimateEntityFeature.TURN_OFF feature.

Previously calls to turn off my Kumo devices would fail silently from Google and an error message in Home Assistant regarding an unsupported service.

I have tested this change to fix my issue.
@bryanyork
Copy link
Author

Discussion in #137

@bryanyork
Copy link
Author

@dlarrick any thoughts on this one? Seems to work great for my setup. (Both via Google Assistant and Home Assistant apps)

@dlarrick
Copy link
Owner

Didn't we remove this to stop some deprecation warning? Let me dig up that PR too...

@dlarrick
Copy link
Owner

Yeah -- #155 which references #137

So with this change to your local files you're not seeing that warning? Or if you are, can you research the proper way to fix all this?

@dlarrick
Copy link
Owner

dlarrick commented Dec 7, 2024

I am starting to think this PR is, in fact, exactly what's needed for Google Assistant: I was trying to understand how it could do Climate.TURN_ON without remembering what mode it was in last, but this PR avoids that issue.

I'm hoping to have some time to test over the next few weeks; but in the meantime if folks who have noted this issue could try out this PR, that would be helpful. @OmenWild @VeniceNerd @ilndboy

@mxr
Copy link
Contributor

mxr commented Dec 13, 2024

I can confirm I was experiencing this issue (with Alexa or even when triggering action: climate.turn_off). I applied this change and it works now. Thank you!

@mxr
Copy link
Contributor

mxr commented Dec 13, 2024

Thinking on this more, to support 2025.1, I think you actually need to implement turn_on and turn_off actions. For example see https://github.com/home-assistant/core/blob/d6c81830a41d4904127725f33a338a80de8839ad/homeassistant/components/zhong_hong/climate.py#L228-L234

I have done so in #176

@dlarrick
Copy link
Owner

Thinking on this more, to support 2025.1, I think you actually need to implement turn_on and turn_off actions.

I think that's incorrect. I think we can choose to implement turn_off only as long as we leave the _enable_turn_on_off_backwards_compatibility = False in place.

If I'm wrong here we'll have to do something else, like store the last HVAC mode in a file for use in turn_on.

@dlarrick
Copy link
Owner

#176 addressing the same issue is now merged.
I would accept a further PR to implement climate.turn_on if it somehow tracks what the last mode was, for example storing the last state in a JSON file (alongside kumo_cache.json).

@dlarrick dlarrick closed this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants